<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
<script>
    var intNum=100;
    var doubleNum=3.1415926;
    var notNum=NaN;/*表示含义为not a number*/
    /*打印变量的类型，typeof可以获取变量的类型*/
    console.log(typeof intNum,typeof doubleNum,typeof notNum);

    var emptyStr="";
    var str="hello world";//空字符串
    console.log(typeof str);
    
    var boolean1=true;
    console.log(typeof boolean1);
    //一个变量仅仅声明了，但是没有赋值，它的类型就是undefine
    var userName;
    console.log(typeof userName);
    //null表示空对象
    var obj=null;
    console.log(typeof obj);
</script>
</html>